import Vue from 'vue'
import App from './App.vue'
Vue.config.productionTip = false

import VueRouter from "vue-router"
Vue.use(VueRouter)
import UI_Router from "./components/UI_Router.vue"
import Contacts from "./components/Contacts.vue"
import About from "./components/About.vue"
import All_Contacts from "./components/All_Contacts.vue"
import Alice from "./components/Alice.vue"
import Bob from "./components/Bob.vue"
import Blog from "./components/Blog.vue"
import Fax from "./components/Fax.vue"
const routes = [
  {
    path: "/",
    redirect: "ui_router"
  },
  {
    path: "/ui_router",
    component: UI_Router
  },
  {
    path: "/contacts",
    component: Contacts,
    children: [
      {
        path: "all_contacts",
        component: All_Contacts
      },
      {
        path: "alice",
        component: Alice
      },
      {
        path: "bob",
        component: Bob,
        children: [
          {
            path: "blog",
            component: Blog
          },
          {
            path: "fax",
            component: Fax
          }
        ]
      }
    ]
  },
  {
    path: "/about",
    component: About
  }
]
const router = new VueRouter({ routes })

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
